package project.messagestack.utils;

import android.util.Log;
import android.widget.Toast;

//TODO(Bartek): finish implementation and documentation of logging mechanism 

/**
 * 
 * @author Bartek Przybylski
 *
 */
public class Logger {
  private final static String TAG = "MessageStack";
  
  public static void logInfoWithToast(String message) {
    logInfo(message);
    Toast.makeText(null, message, Toast.LENGTH_SHORT).show();
  }
  
  public static void logInfo(String message) {
    Log.i(TAG, message);
  }
  
  public static void logWarnWithToast(String message) {
    logWarn(message);
    Toast.makeText(null, message, Toast.LENGTH_SHORT).show();
  }
  
  public static void logWarn(String message) {
    Log.w(TAG, message);
  }
  
  public static void logDebug(String message) {
    Log.d(TAG, message);
  }
  
  public static void logErrorWithToast(String message) {
    logError(message);
    Toast.makeText(null, message, Toast.LENGTH_SHORT).show();
  }
  
  public static void logError(String message) {
    Log.e(TAG, message);
  }
  
}
